package br.ufrj.ppgi.greco.mapaitem;

import java.util.List;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.Log;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class HotelOverlay extends ItemizedOverlay
{
	private Context context;
	private List<Hotel> hoteis;
	
	
	public HotelOverlay(Context context, List<Hotel> hoteis, Drawable drawable)
	{
		super(drawable);
		this.context = context;
		this.hoteis = hoteis;
		boundCenter(drawable);
		populate();
	}
	
	
	@Override
	protected OverlayItem createItem(int i)
	{
		return  (OverlayItem) this.hoteis.get(i);
	}

	@Override
	public int size()
	{
		return this.hoteis.size();
	}
	
	protected boolean onTap(int i)
	{
		Hotel hotel = this.hoteis.get(i);
		Log.d("ID",hotel.getIdHotel());
		return true;
	}
	

}
